import Router from '@koa/router'
import uploadController from '../controller/upload.controller'
import { uploadMiddleware } from '../middleware/upload.middleware'
import { tokenAuth } from '../middleware/auth.middleware'

const uploadRouter = new Router({ prefix: '/upload' })

uploadRouter.post('/', tokenAuth, uploadMiddleware, uploadController.upload.bind(uploadController))

export default uploadRouter
